package cn.itsource.crm.service.impl;

import cn.itsource.crm.domain.Permission;
import cn.itsource.crm.mapper.PermissionMapper;
import cn.itsource.crm.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

@Service
public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements IPermissionService {

    @Autowired
    PermissionMapper permissionMapper;

    @Override
    public Set<String> findPermissionssnsByLoginUser(Long id) {
        return permissionMapper.findPermissionssnsByLoginUser(id);
    }

    @Override
    public List<Permission> findAllByRoleId(Long id) {
        return permissionMapper.findAllByRoleId(id);
    }
}
